<script language="javascript" type="text/javascript">
	$.getScript('js/group.tab.js', function() {
		groupPageLoaded('group_edit');
	});
</script>

<div class="tab_content" style="min-height: 500px;">

<div class="header">
	<div class="pageLinks">
		<a href="#/グループ" onclick="loadPage('グループ');return false;">グループ</a> > 
		<strong>グループ編集</strong>
	</div>
	<div class="Group_name">
		グループ： <?php echo $group_name ?>
	</div>
	<div class="Help">
		<img src="image/Help_Button.gif" onclick="showHelp('group_edit');" />
	</div>
</div>
	<?php require($SETTINGS['VIEW_PATH'] . "messages" . $SETTINGS['VIEW_NAME']) ?>

	<input type="hidden" id="current_group_name" value="<?php echo $group_name ?>" />
	
	<div id="groupEditLoading" style="padding:0px 45% 20px 45%;display:none;"><img src="image/loading_icon.gif"></div>

	<div id="groupAddFromList">
		<div><a href="#" onclick="addFromFriends('friends');return false;">フォローしているユーザーから追加</a></div>
		<div><a href="#" onclick="addFromFriends('followers');return false;">フォローされているユーザーから追加</a></div>
	</div>
		
	<div style="margin:-50px 0 0 0 ;">
			<span style="margin:0 0px 2px -40px;">
				Twitter名：  
				<input type="text" name="account" id="account" value="<?php echo(htmlspecialchars($account, ENT_QUOTES)); ?>"/>
				<input type="button" onclick="accountCheck()" name="check" id="check_button" value="チェック" /> 
				<input type="button" onclick="accountAdd()" id="add_button" value="登録" />
			</span>
			<span id="data_loading"></span>
			<input type="hidden" name="screen_name" id="screen_name" value="" />
			<input type="hidden" name="mode" id="mode" value="" />
		<?php
			if(isset($_POST["Check"])) {
				$icon = $info["profile_image_url_http"];

				echo '<div><img src="{$icon}>"></div>';
			}
		?>

<?php
//**********************************************************
//ユーザー情報表示
//**********************************************************
?>

		<div id="twitter_icon" style="margin:28px -5px 0 20px;float:left;width:48px;height:48px;"></div>
		<textarea id="description_box" cols="60" rows="7" wrap="hard" style="resize:none;float:left;clear:right;margin-bottom:30px;margin-left:10px;" disabled="disabled"></textarea>



<?php
//**********************************************************
//メンバー一覧表示
//**********************************************************
?>
		<div style="width:102%;clear: both; border: 1px solid gray;">
			<div id="box">
				<div class="user_box template" style="display:none; width:700px; height:100px;">
					<div class="followersHoverColor" >
						<input type="hidden" name="user_id" value="">
						<div class="followersCheckbox"><input type="checkbox" class="chk_del"></div>
						<div class="user_box_icon" style="width:48px;height:48px;margin-right:2px;"></div>
						<div class="user_box_desc" style="border:1px solid #000000; width:493px; height:46px; overflow-y:auto;"></div>
						<br style="clear:both;"/>
						<div class="groupedit-loadingIcon"></div>
						<div class="user_screen_name" style="padding:5px 0px 5px 45px;	font-size:16px;">
							<span style="font-weight:bold">Twitter名:</span>
						</div>
						<div style="float: right">
							<span style="font-weight:bold;font-size:16px;">表示名：</span>
							<input type="text" name="groupedit-username" class="username-unchanged" size="21" onfocus="usernameFocus(this)" onkeyup="usernameChange(this)" value="" maxlength="25" >
							<input type="button" name="username-update" class="username-update" value="変更" onclick="usernameUpdate(this)" disabled="disabled" />
						</div>
					</div>
					<hr style="clear:left;float:left; width: 85%;">
				</div>

			<?php
				foreach ($group_members as $member) {
			?>
				<div class="user_box" style="width:700px; height:100px;">
					<div class="followersHoverColor" >
						<input type="hidden" name="user_id" value="<?php echo $member->id; ?>" />
						<div class="followersCheckbox">
							<?php if (!$member->isLeader) { ?>
								<input type="checkbox" class="chk_del">
							<?php } else { ?>
								<span style="padding-left:4px;">★</span>
							<?php } ?>
						</div>
						<div class="user_box_icon" style="width:50px;height:50px;margin-right:2px;"><img style="width:50px;height:50px;" src="<?php echo $member->profile_img ?>"></div>
						<div class="user_box_desc" style="border:1px solid #000000; width:493px; height:48px; overflow-y:auto;font-size:12px;">
							<?php echo $member->description; ?>	
						</div>
						<br style="clear:both;"/>
						<div class="groupedit-loadingIcon"></div>
						<div class="user_screen_name" style="padding:5px 0px 5px 45px;	font-size:16px;">
							<span style="font-weight:bold">Twitter名:</span> <?php echo $member->twitter_username; ?>
						</div>
						<div style="float: right">
							<span style="font-weight:bold;font-size:16px;">表示名：</span>
							<input type="text" name="groupedit-username"
								<?php if ($member->isLocalName) { ?> 
									class="username-changed" 
								<?php } else { ?> 
									class="username-unchanged" 
								<?php } ?>
								size="21" onfocus="usernameFocus(this)" onkeyup="usernameChange(this)" value="<?php echo $member->name; ?>" maxlength="25" >
							<input type="button" name="username-update" class="username-update" value="変更" onclick="usernameUpdate(this)" disabled="disabled" />
						</div>
					</div>
					<hr style="clear:left;float:left; width: 87%;">
					
				</div>
			<?php
				}
			?>
			</div>
			<div style="text-align:right;">
				
				<input type="button" name="delete" id="delete" value="削除" onClick="removeAccounts()" style="margin:0px 20px 10px 5px;" /> 
			</div>
		</div>
	</div>
</div>